<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="div1" >
		<img src="img1/1.jpg" id="img" width="100px" height="100px" />
		</div>
		<button type="button" onclick="action()"> 开始 </button>
	</body>
	<script type="text/javascript">

	function action(){
	setInterval("showTime()",1000);
	
	
	}
		var i=1;
	function showTime(){
	  i++;
	  
	  var next = document.getElementById("img");
	  
	  next.src = "img1/"+i+".jpg";
	  if(i==9){
	  i=0;
	      } 
	  }
	
	  
	  
	  
	</script>
</html>
